﻿using System;
using System.Collections.Generic;
using HAVNet.Core.String;


namespace HAVNet.Intros.AST
{
    //  ident
    //  "="
    //  Expression<out expr>

    public class ASTIdentExprPair : ASTNode
    {
        public string           ident       { get; set; }
        public ASTExpr    expression  { get; set; }

        public ASTIdentExprPair(string ident, ASTExpr expression)
        {
            this.ident = ident;
            this.expression = expression;
        }

        public override string ToString ()
        {
            return ident + " = " + expression;
        }
    }

    public class ASTIdentExprPairs : List<ASTIdentExprPair>
    {
        public override string ToString()
        {
            return Strings.joinobjs(", ", this);
        }
    }
}
